//
//  CTMediator+Schedule.swift
//  Scheule_Extension
//
//  Created by laomi on 2021/6/13.
//

import CTMediator
let ModelName = "Schedule";
let ActionName = "test";


 public enum VSScheduleParamKey:String {
    case idParam = "id"
    case nameParam = "name"
    case timeZone = "timeZone";
    case swiftKey = "kCTMediatorParamsKeySwiftTargetModuleName"
    case callbackKey = "callbackKey"
}



public typealias  VSScheduleDictionary = Dictionary<VSScheduleParamKey, Any>

//@objc(CTMediator)
public extension CTMediator {
    func abcde( param: VSScheduleDictionary)->UIViewController{
        let swiftKeyDic = [VSScheduleParamKey.swiftKey:ModelName];
        var realParam = Dictionary<String,Any>();
        for (key,value) in swiftKeyDic {
            realParam[key.rawValue] = value
        }
        for (key,value) in param {
            realParam[key.rawValue] = value
        }
        
        return CTMediator.sharedInstance().performTarget(ModelName, action: ActionName, params:(realParam as [AnyHashable : Any]), shouldCacheTarget: false) as! UIViewController
        
    }
}
